package HomeWork.Chapter04;

/**
 * Enjoy programming!!!
 * Time: 2021/11/27 -  15:00
 */
import java.util.Scanner;
public class Calculation {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        double l = input.nextDouble();
        double w = input.nextDouble();
        double h = input.nextDouble();
        Cuboid myCuboid = new Cuboid(l, w, h);
        System.out.printf("%.4f",myCuboid.getArea());
        System.out.println();
        System.out.printf("%.4f",myCuboid.getVolume());

        input.close();
    }
}
class Cuboid{
    private double length;
    private double width;
    private double height;

    public Cuboid(double l, double w, double h){
        length = l;
        width = w;
        height = h;
    }

    public double getArea(){
        return 2 * (length * width + width * height + length * height);
    }

    public double getVolume(){
        return length * width * height;
    }
}